When suspending on the authentication page of the lock screen in a user
session, the session resumes with the authentication dialog shown but
its password entry field unfocused. Instead, focus moves to the
authentication dialog itself while _ensureUnlockDialog() in
screenShield.js is called on resume.
Avoid this edge case by switching to the clock view instead before
suspend, which also provides a more consistent user experience.
Co-authored-by: Florian Müllner <fmuellner@gnome.org>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3962>
_prepareForSleep(loginManager, aboutToSuspend) {
if (aboutToSuspend) {
+ this._dialog?.cancel();
if (this._settings.get_boolean(LOCK_ENABLED_KEY))
this.lock(true);
} else {